package com.zzyl.nursing.service;

import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.Reservation;
import com.zzyl.nursing.vo.ReservationVo;

import java.util.List;

public interface ReservationService {
    /**
     * 新增预约
     * @param reservation
     */
    void insertReservation(Reservation reservation);

    /**
     * 取消预约
     * @param id
     */
    void cancelReservation(Long id);

    /**
     * 查询取消预约数量
     * @return
     */
    Integer getCancelledCount();

    /**
     * 分页查询预约
     * @param
     * @param pageNum
     * @param pageSize
     * @return
     */
    TableDataInfo<Reservation> selectReservationByPage(Integer status, Integer pageNum, Integer pageSize);

    /**
     * 查询每个时间段剩余的预约此数
     * @param time
     * @return
     */
    List<ReservationVo> selectCountByTime(Long time);
}
